<template>
  <el-config-provider :size="size" :locale="locale">
    <router-view />
  </el-config-provider>
</template>

<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import Cookies from "js-cookie";
import localeZhCn from 'element-plus/es/locale/lang/zh-cn'

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})

let size = ref(Cookies.get('size') || 'default')
let locale = ref(localeZhCn)
</script>
